
import request from '@/utils/request'
// 商品搜索
/**
 * pageIndex	否
pageSize	否
skuName	否		商品名称
classId
 * @param {*} params
 * @returns
 */
export const skuSearchList = (params) => {
  return request({
    url: `/api/vm-service/sku/search`,
    params
  })
}
// 新增商品
export const addSku = (data) => {
  return request({
    url: `/api/vm-service/sku`,
    data,
    method: 'POST'
  })
}
// 删除商品类型
export const delSkuClass = (classId) => {
  return request({
    url: `/api/vm-service/skuClass/${classId}`,
    method: 'DEELE'
  })
}
// 商品类型搜索
export const skuClass = (params) => {
  return request({
    url: `/api/vm-service/skuClass/search`,
    params
  })
}
// 新增商品类型
export const creatSku = (data) => {
  return request({
    url: `/api/vm-service/skuClass`,
    data,
    method: 'POST'
  })
}
// 修改商品
export const editSku = (classId, data) => {
  return request({
    url: `/api/vm-service/skuClass/${classId}`,
    data,
    method: 'PUT'
  })
}
// 删除商品类型
export const delSku = (classId) => {
  return request({
    url: `/api/vm-service/skuClass/${classId}`,
    method: 'DELETE'
  })
}
// /修改商品
export const editSkuInfo = (skuId, data) => {
  return request({
    url: `/api/vm-service/sku/${skuId}`,
    data,
    method: 'PUT'
  })
}
// 商品数据导入
export const uploadSku = (data) => {
  return request({
    url: `/api/vm-service/sku/upload`,
    data,
    method: 'POST'
  })
}
